'use strict';

const { validatorPhone, validatorDate } = require('../common/index');

module.exports = {
  startTime: [
    { required: true, message: '日期必填' },
    { type: 'string', message: '日期必须为字符串' },
    { validator: validatorDate() },
  ],
  endTime: [
    { required: true, message: '日期必填' },
    { type: 'string', message: '日期必须为字符串' },
    { validator: validatorDate() },
  ],
  phoneNum: [
    { required: true, message: '手机号必填' },
    { validator: validatorPhone() },
  ],
  comment: [
    { required: true, message: '特点名必填' },
    { type: 'string', message: '备注必须为字符串' },
    { min: 0, max: 500, message: '备注长度最大500字' },
  ],
  persons: [
    { required: true, message: '入住人必填' },
    { type: 'string', message: '格式错误' },
  ],
};
